<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
include_once("../controller/system.php");
?>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <? include_once(ROOT_PATH_ . "/controller/common/module/head.php"); ?>

    <?php include 'module/head.php'; ?>
</head>


<body>

<div id="topbar">
    <?php include ROOT_PATH_ . '/controller/common/module/topbar.php'; ?>
</div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_ . '/controller/common/module/sidebar.php'; ?>
        </div>


        <div id="content">
            <?php $page_title='系统设置';?>
            <?php include ROOT_PATH_ . '/controller/common/module/mod-page-title.php'; ?>






                <blockquote class="layui-elem-quote">基础设置多数是对外使用的资料，请细心填写。</blockquote>
            <br/>


<div class="site detail-box layui-form">
<div class="detail-boxes">
<ul class="detail-boxing">


<form id="site_info" method="post"
      action="system-function.php" enctype="multipart/form-data"
      name="uploadfile" >





    <fieldset class="layui-elem-field layui-field-title" >
        <legend>基础设置</legend>
    </fieldset>



    <div class="layui-form-item site-name">
        <label class="layui-form-label">网站名称 : </label>
        <div class="layui-input-block">
            <input type="text" name="site_name"  autocomplete="off"  class="layui-input" value="<?php echo $detail['name'] ?>">
        </div>

    </div>
















    <div class="layui-form-item logo"><label class="layui-form-label">LOGO：</label>
        <? if($detail['logo']){ ?>
            <img src="../../uploadfiles/<? echo $theme_folder ?>/<? echo $detail['logo'] ?>" width="100" style="border:solid 1px #ececec; background-color:#ececec"/>
        <? }
        else
        { echo "暂无资料";}
        ?>
    </div>



    <div class="layui-form-item layui-form-item logo"><label class="layui-form-label">上传文件：</label><input type="file" name="site_logo" onchange="fileChange(this);"/>
        <em class="explain">上传网站首页顶部LOGO</em><br/><br/></div>





    <div class="layui-form-item browser-icon"><label class="layui-form-label">网站图标：</label>
        <? if($detail['icon']){ ?>
            <img src="../../uploadfiles/<? echo $theme_folder ?>/<? echo $detail['icon'] ?>" width="100"  style="border:solid 1px #ececec;background-color:#ececec"/>
        <? }

        else
        { echo "暂无资料";}
        ?>
    </div>
    <div class="layui-form-item browser-icon"><label class="layui-form-label">上传文件：</label><input type="file" name="site_icon"  onchange="fileChange(this);"/><em class="explain">上传浏览器标签页显示的网站LOGO</em><br/><br/></div>








    <fieldset class="layui-elem-field layui-field-title notice_title" style="margin-top: 60px;">
        <legend>通讯设置</legend>
    </fieldset>




<blockquote class="layui-elem-quote notice_title">填写接收网站更新、客户留言等通知的邮箱、手机号</blockquote>

<div class="layui-form-item mail1">
<label class="layui-form-label">通知邮箱1：</label>
<div class="layui-input-block">
<input type="text" name="site_mmail01" size="20" value="<?php echo $detail['mmail01'] ?>"
onblur="chkEmail(site_mmail01)" class="layui-input"  >
</div>
</div>


<div class="layui-form-item mail2" >
<label class="layui-form-label">通知邮箱2：</label>
<div class="layui-input-block">
<input type="text" name="site_mmail02" size="20"
value="<?php echo $detail['mmail02'] ?>" onblur="chkEmail(site_mmail02)" class="layui-input"  >
</div>
</div>





<div class="layui-form-item sms1">
<label class="layui-form-label">短信通知1：</label>
<div class="layui-input-block">
<input type="text" name="site_msms01" size="20" value="<?php echo $detail['msms01'] ?>" onkeydown="onlyNum();"class="layui-input"  >
</div>
</div>
<div class="layui-form-item sms2"><label class="layui-form-label">短信通知2：</label>    <div class="layui-input-block"><input type="text" name="site_msms02" size="20"
value="<?php echo $detail['msms02'] ?>" onkeydown="onlyNum();"class="layui-input"  >
</div>
</div>
<div class="layui-form-item sms3"><label class="layui-form-label">短信通知3：</label>    <div class="layui-input-block"><input type="text" name="site_msms03" size="20"
value="<?php echo $detail['msms03'] ?>" onkeydown="onlyNum();"class="layui-input"  >
</div>
</div>





    <!-- <fieldset class="layui-elem-field layui-field-title ">
        <legend>系统设置</legend>
    </fieldset>



    <div class="layui-form-item">
        <label class="layui-form-label">管理员模式</label>
        <div class="layui-input-block">
            <input type="radio" id="modelON" name="modelON" lay-filter="modelON" value="ON" title="开">
            <input type="radio" id="modelOFF"  name="modelON" lay-filter="modelON" value="OFF" title="关" >
        </div>
    </div> -->

    <!-- <hr/> -->

<div class="function">
<input type="submit" class="layui-btn" value="确认"/>
<input type="reset" class="layui-btn" value="重置"/>
</div>



                        </form>


                    </ul>
                </div>
            </div>

            <!--content端點01-->
        </div>
        <!--maincontent端點01-->
        <br class="clearfloat"/>
    </div>
    <!--container端點01-->
</div>

<script>

    layui.use('form', function(){
        var form = layui.form;
        form.on('radio(modelON)', function(data){
            if(data.value == 'ON'){
                $.cookie("administrator_mode","true",{path: '/controller' })
                console.log($.cookie("administrator_mode"))
            }else{
                $.cookie("administrator_mode","",{path: '/controller' })
                console.log($.cookie("administrator_mode"))
            }
        });

    });

        if($.cookie("administrator_mode")){
            $("#modelON").attr("checked","checked");
        }else{
            $("#modelOFF").attr("checked","checked");
        }


layui.use('upload', function(){
  var upload = layui.upload;
   
  //执行实例
  var uploadInst = upload.render({
    elem: '#test1' //绑定元素
    ,url: '/api/uplpad_video.php?theme_folder=<?php echo $theme_folder?>' //上传接口
	  ,before: function(obj){ //obj参数包含的信息，跟 choose回调完全一致，可参见上文。
		index= layer.load(); //上传loading
	  }
    ,done: function(res){
      //上传完毕回调
	     $('.video_file').val(res.src)
		  layer.msg(res.msg); 
		  layer.close(index);
		
    }
    ,error: function(){
      //请求异常回调
    }
  });
});
</script>

<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?>
</body>
</html>
